//
//  MarketCell.m
//  DIGICCY
//
//  Created by mac on 2019/10/14.
//  Copyright © 2019 mac. All rights reserved.
//

#import "MarketCell.h"
#import "MarketModel.h"

@interface MarketCell ()

@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@property (weak, nonatomic) IBOutlet UILabel *spriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *amountLabel;
@property (weak, nonatomic) IBOutlet UIImageView *statusImageV;

@end

@implementation MarketCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.amountLabel.layer.cornerRadius = 2;
    self.amountLabel.layer.masksToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(MarketModel *)model {
    
    _nameLabel.text = [NSString stringWithFormat:@"%@*%@",model.commodityNo,model.symbol];
    _descLabel.text = model.descriptions;
    _spriceLabel.text = model.lastSprice;
    _amountLabel.text = model.amount;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
    }
    
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
}

@end
